import axios from "axios";
let BASEURL = '';
const music  = axios.create({
    baseURL:BASEURL,
    timeout:0
});
music.interceptors.request.use(
    conf=>{
        // conf.method === 'get'?
        // conf.params = delKey(Object.assign(baseData,conf.params)):
        // conf.data = qs.stringify(delKey(Object.assign(baseData,conf.data)));
        // conf.headers['Content-Type'] = 'application/x-www-form-urlencoded';
        return conf;
    },err=>{
        Promise.reject(err)
    })

music.interceptors.response.use(
    res=>{
        return res.data
    },
    err=>{
        if(err){
            let text = '网络异常，请重试';
            alert(text);
        }
        return Promise.reject(err)
    }
)
export default music